package cn.com.chengmandian.service.iot;

import cn.com.chengmandian.core.web.pojo.AjaxResult;
import cn.com.chengmandian.service.iot.form.BatteryLockForm;
import cn.com.chengmandian.service.iot.form.BmsUpgradeForm;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

@FeignClient(name = "cmd-iot-battery")
public interface IotBatteryClient {
    /**
     * 要求数据上报
     */
    @PostMapping("/iotbattery/inner/battery/report/{deviceNo}")
    AjaxResult report(@PathVariable String deviceNo);

    /**
     * BMS升级
     */
    @PostMapping("/iotbattery/inner/battery/upgrade")
    AjaxResult upgrade(@RequestBody BmsUpgradeForm bmsUpgradeForm);

    /**
     * 锁电
     */
    @PostMapping("/iotbattery/inner/battery/lock")
    AjaxResult lock(@RequestBody BatteryLockForm batteryLockForm);
}
